<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!--
    	作者：845510257@qq.com
    	时间：2017-10-25
    	描述：title部分，公共js,公共css和jstl标签库
    -->
<%@include file="/source/page/parts/title.jsp"%>
<!-- 	下面引入本页面单独引入的资源 -->

<%-- <%request.setAttribute("teacher_been_id", 35); %> --%>

<link rel="stylesheet"
	href="/GDZjiajiaowang/source/css/personalCenter.css" type="text/css" />


<script type="text/javascript">
	var teacher_been_id = '${id}';
	// 	alert("当前登录人Id:" + teacher_been_id)
	<!--
</script>


<script type="text/javascript"
	src="/GDZjiajiaowang/source/js/personalCenter.js"
	type="text/javascript" charset="UTF-8"></script>


</head>

<body>
	<!--
            	作者：GGVVR
            	时间：2017-10-25
            	描述：header部分（head_top、head_middle、head_botton）
            -->
	<%@include file="/source/page/parts/header.jsp"%>

	<!--
        	作者：972893248@qq.com
        	时间：2017-11-08
        	描述：个人中心
        -->
	<section>
		<div class="section_box clearfix">
			<div class="section_box_inside clearfix">
				<!--
                    	作者：972893248@qq.com
                    	时间：2017-11-10
                    	描述：左侧菜单切换
                    -->
				<div>
					<ul class="section_box_inside_left clearfix"
						id="section_box_inside_left_ul">
						<li class="click_change" id="first_select">个人资料</li>
						<li class="click_change" id="second_select">身份认证</li>
						<li class="click_change" id="third_select">待付款订单<span>${personalCenterInfos.teacherOrderNotPayList.size()}</span></li>
						<li class="click_change" id="fourth_select">申请记录</li>
						<li class="click_change" id="fifth_select">成功记录</li>
						<li class="click_change" id="seventh_select">修改密码</li>
						<li class="click_change" id="sisth_select">账户注销</li>
					</ul>
					<!--
                        	作者：972893248@qq.com
                        	时间：2017-11-10
                        	描述：右侧变化窗口1
                        -->
					<div
						class="section_box_inside_change_menuinfo clearfix section_box_left_div_comment_bywujinshan">
						<div class="section_box_inside_teachergeneral_info">
							<img src="${personalCenterInfos.src}" id="head_pic" /> <input
								type="button" id="headImgSubmitButton" value="确定修改" />
							<ul>
								<li><span id="teacher_call">${personalCenterInfos.teacherRealName}</span>老师</li>
								<li>教师编号：<span id="color_as">T3124</span><span
									class="color_change" id="teacher_no">${id}</span></li>
								<li>等级：<span class="color_change"></span><span
									class="color_change" id="teacher_level">${personalCenterInfos.teacherLevel}</span></li>
								<li><span>简历浏览：</span><span id="click_times">${personalCenterInfos.clicks}</span><span>次</span><span
									id="recent_login">最近登录时间：</span><span id="update_time">${personalCenterInfos.teacherUpdateDate}</span></li>
								<li><span>认证情况：</span><span>尚未认证您的真实证件</span><span
									id="email_function">邮箱认证已通过</span></li>
								<li><span>个人简历状态：</span><span class="color_change">审核中</span><span>(注：注册资料不完整有可能导致不能通过审核)</span></li>
							</ul>
						</div>
						<div class="undeline_useless"></div>
						<!--
                              	作者：972893248@qq.com
                              	时间：2017-11-10
                              	描述：下划线下部分
                              -->
						<div class="section_box_inside_step_introduce">
							<img src="/GDZjiajiaowang/source/img/wtitle.png" />

							<div class="section_box_inside_step_introduce_box">
								<div>
									<h4>1、加微信，随时查</h4>
								</div>
								<p>扫一扫，加关注，及时查看家教订单，接单快人一步！</p>
								<p>还可随时申请订单。</p>
							</div>
							<div class="section_box_inside_step_introduce_box">
								<div>
									<h4>2、上传形象照，更出彩</h4>
								</div>
								<p>阳光、健康、专业的形象照，增加您的第一印象分，让家长一眼就选定你，马上动手吧。</p>
								<p class="color_button_showinfo">上传形象照</p>
								<!-- 								<form action="/GDZjiajiaowang/PersonCenterServlet"> -->
								<!-- 									<input type="hidden" name="id" value="23"> <input -->
								<!-- 										type="hidden" name="op" value="saveHeadPic"> <label><input -->
								<!-- 										type="file" name="file1"></label> -->
								<!-- 									<button>提交</button> -->
								<!-- 								</form> -->
							</div>
							<div class="section_box_inside_step_introduce_box">
								<div>
									<h4>3、完善简历，秀出风采</h4>
								</div>
								<p>尽量将您的资料填写详细，并突出您的特长和家教相关经验，以方便家长及家教114工作人员选择、推荐。好的简历，事半功倍，可以大大增加您的接单率！</p>
								<p class="color_button_showinfo">简历预览</p>
								<p class="color_button_showinfo">修改简历</p>
							</div>
							<div class="section_box_inside_step_introduce_box">
								<div>
									<h4>4、官网认证，更加权威，机会更多</h4>
								</div>
								<p>请您尽快将证件（如身份证、学生证、毕业证、家教资料证或相关的在职证明等）到网站上传进行身份验证，认证的教员我们将优先推荐家教。</p>
								<p class="color_button_showinfo">网上认证</p>
							</div>

						</div>
					</div>
					<!--
                        	作者：972893248@qq.com
                        	时间：2017-11-10
                        	描述：右侧变化窗口2个人信息
                        -->
					<div
						class="section_box_inside_change_menuinfo2 clearfix section_box_left_div_comment_bywujinshan">
						<div class="personal_box_info">
							<h4>身份信息</h4>
							<p class="order_number_showInfo">您可以在个人资料页面选择上传个性头像</p>
							<div class="order_number_showInfo_box">
								<div class="big_title">
									基本资料
									<span id="modify_info">点击修改真实姓名</span>
								</div>
								<div class="underline_div">
									真实姓名：<input type="text" id="update_form_name_check"
										value="${personalCenterInfos.teacherRealName}" /><span
										class="info_unselect" id="update_form_name_show">${personalCenterInfos.teacherRealName}</span><span id="sureButton">确认</span>
								</div>
								<!-- 								<div class="underline_div"> -->
								<!-- 									性别： <select id="update_form_sex_check"> -->
								<!-- 										<c:if test="${personalCenterInfos.teacherSex=='男'}"> -->
								<!-- 											<option value="男" selected="selected">男</option> -->
								<!-- 											<option value="女">女</option> -->
								<!-- 										</c:if> -->
								<!-- 										<c:if test="${personalCenterInfos.teacherSex=='女'}"> -->
								<!-- 											<option value="男">男</option> -->
								<!-- 											<option value="女" selected="selected">女</option> -->
								<!-- 										</c:if> -->


								<!-- 									</select> <span class="info_unselect" id="update_form_sex_show">${personalCenterInfos.teacherSex}</span> -->
								<!-- 								</div> -->
								<!-- 								<div class="underline_div"> -->
								<!-- 									毕业学校：<input type="text" id="update_form_school_check" -->
								<!-- 										value="${personalCenterInfos.teacherUniversity}" /><span -->
								<!-- 										class="info_unselect" id="update_form_school_show">${personalCenterInfos.teacherUniversity}</span><input -->
								<!-- 										type="text" class="maj_sub" id="update_form_major_check" -->
								<!-- 										value="${personalCenterInfos.teacherSpeciality}" /><span -->
								<!-- 										class="info_unselect" id="update_form_major_show">${personalCenterInfos.teacherSpeciality}<span>专业</span></span> -->
								<!-- 								</div> -->

								<!-- 								<div class="underline_div"> -->
								<!-- 									籍贯：<input type="text" id="update_form_country_check" -->
								<!-- 										value="${personalCenterInfos.teacherNative}" /><span -->
								<!-- 										class="info_unselect" id="update_form_country_show">${personalCenterInfos.teacherNative}</span> -->
								<!-- 								</div> -->
<!-- 								<div class="underline_div"> -->
<!-- 									注册时间：<input type="text" id="update_form_retime_check" -->
<!-- 										disabled="disabled" -->
<!-- 										value="${personalCenterInfos.teacherRegisterDate}" /><span -->
<!-- 										class="info_unselect" id="update_form_retime_show">${personalCenterInfos.teacherRegisterDate}</span> -->
<!-- 								</div> -->
								<!-- 								<div class="underline_div"> -->
								<!-- 									联系方式：<input type="text" id="update_form_phone_check" -->
								<!-- 										value="${personalCenterInfos.teacherPhone}" /><span -->
								<!-- 										class="info_unselect" id="update_form_phone_show">${personalCenterInfos.teacherPhone}</span> -->
								<!-- 								</div> -->
<!-- 								<div class="comment_large_div"> -->
<!-- 									自我评价： -->
<!-- 									<textarea class="comment_large" id="update_form_comment_check">${personalCenterInfos.selfmark}</textarea> -->
<!-- 									<span class="info_unselect" id="update_form_comment_show">${personalCenterInfos.selfmark}</span> -->
<!-- 								</div> -->
								<!-- 								<div class="hide_input first_line"> -->
								<!-- 									身份证件：<input type="text" id="update_form_identity_check" -->
								<!-- 										value="${personalCenterInfos.teacherIdentity}" /><span -->
								<!-- 										class="info_unselect" id="update_form_identity_show">${personalCenterInfos.teacherIdentity}</span> -->
								<!-- 								</div> -->
								<div class="hide_input">
									性别：
									<div class="zhiyexuanzeDiv onlyOne sextochoose">
										<p class="subject_teached sextochoose" id="sextochoose">
											<span value="男">男</span> <span value="女">女</span>
										</p>

									</div>
								</div>
								<div class="hide_input">
									授课方式：
									<div class="zhiyexuanzeDiv onlyOne">
										<p class="subject_teached workTypeToChoose">
											<span value="1">上门辅导</span> <span value="3">补习班辅导</span>
										</p>

									</div>
								</div>
								<div class="hide_input">
									职业：
									<div class="zhiyexuanzeDiv onlyOne ">
										<p class="subject_teached workCareer">
											<span value="1">高校学生</span> <span value="3">退休老师</span> <span
												value="2">在校老师</span>
										</p>

									</div>
								</div>
								<div class="hide_input">
									学历：
									<div class="zhiyexuanzeDiv onlyOne">
										<p class="subject_teached educationTochoose">
											<span value="专科">专科</span> <span value="3">本科</span> <span
												value="研究生">研究生</span><span value="3">博士</span><span
												value="3">海归</span>
										</p>

									</div>
								</div>
								<div class="hide_input">
									工作经验：
									<div class="zhiyexuanzeDiv onlyOne">
										<p class="subject_teached hasWorkYears">
											<span value="1">1年</span> <span value="3">2年</span> <span
												value="2">3年</span><span value="3">5到10年</span><span
												value="3">10年以上</span>
										</p>

									</div>
								</div>
								<!-- 								<div class="hide_input"> -->
								<!-- 									相关证书：<input type="text" id="update_form_reward_check" -->
								<!-- 										value="${personalCenterInfos.certificate}" /><span -->
								<!-- 										class="info_unselect" id="update_form_reward_show">${personalCenterInfos.certificate}</span> -->
								<!-- 								</div> -->
								<div class="hide_input twoAndMore">
									教授年级：
									<p class="subject_teached gradeToChoose">
										<span value="8">一年级</span> <span value="9">二年级</span> <span
											value="10">三年级</span> <span value="11">四年级</span> <span
											value="12">五年级</span><br> <span value="13">六年级</span> <span
											value="14">初一</span> <span value="15">初二</span> <span
											value="16">初三</span> <span value="17">高一</span><br> <span
											value="18">高二</span> <span value="19">高三</span>

									</p>
								</div>
								<div class="hide_input twoAndMore">
									教授学科：
									<p class="subject_teached subjectToChoose">
										<span value="1">语文</span> <span value="2">数学</span> <span
											value="3">英语</span> <span value="4">物理</span> <span value="9">历史</span><br>
										<span value="8">政治</span> <span value="5">化学</span> <span
											value="7">地理</span> <span value="6">生物</span>

									</p>
								</div>
								<div class="hide_input onlyOne">
									教授区域：
									<p class="subject_teached workAreaOne">
										<span value="320102">玄武区</span> <span value="320103">白下区</span>
										<span value="320104">秦淮区</span> <span value="320105">建邺区</span>
										<span value="320106">鼓楼区</span><br> <span value="320107">下关区</span>
										<span value="320111">浦口区</span> <span value="320113">栖霞区</span>
										<span value="320114">雨花台区</span> <span value="320115">江宁区</span>
										<span value="320116">六合区</span>

									</p>
								</div>

								<div class="hide_input">
									<input type="button" value="保存" class="button_save"
										id="send_newacts" />
								</div>
							</div>
						</div>
					</div>
					<!--
                        	作者：972893248@qq.com
                        	时间：2017-11-10
                        	描述：右侧变化窗口3
                        -->
					<div
						class="section_box_inside_change_menuinfo3 clearfix section_box_left_div_comment_bywujinshan">
						<div>
							<h4>
								尊敬的教员！您有<span class="order_number">0</span>笔家教订单代支付!
							</h4>
							<p class="order_number_infounder">由于家教信息具有很强时效性，请尽快完成支付谢谢配合。</p>
						</div>

						<c:choose>
							<c:when
								test="${fn:length(personalCenterInfos.teacherOrderNotPayList)>0}">
								<div class="order_table">
									<table class="order_table_operate">

										<caption>待付订单</caption>
										<tr>
											<th>订单号</th>
											<th>所在区域</th>
											<th>求教科目</th>
											<th>待付金额</th>
											<th>接单时间</th>
											<th>操作</th>
										</tr>
										<c:forEach
											items="${personalCenterInfos.teacherOrderNotPayList}"
											var="orderNotPay">

											<tr>
												<td>${orderNotPay["orderId"]}</td>
												<td>${orderNotPay["addressName"]}</td>
												<td>${orderNotPay["subjectName"]}</td>
												<td><span>￥</span>${orderNotPay["price"]}</td>
												<td>${orderNotPay["orderBeginTime"]}</td>

												<td><span class="confirm_order">确认订单</span><span>|</span><span
													class="delate_order">删除订单</span></td>
											</tr>
										</c:forEach>
									</table>
								</div>

							</c:when>

							<c:otherwise>
								<div class="order_not_found">
									<img src="/GDZjiajiaowang/source/img/norecord.png" />
								</div>
							</c:otherwise>

						</c:choose>




					</div>

					<!--
                        	作者：972893248@qq.com
                        	时间：2017-11-11
                        	描述：右侧变化窗口4
                        -->
					<div
						class="section_box_inside_change_menuinfo4 section_box_left_div_comment_bywujinshan">
						<div>
							<h4>
								<span class="order_record">徐磊</span>的订单申请记录
							</h4>
							<p>如下是您最近申请过的订单，某些申请记录可能因为特殊原因未被展示。</p>
						</div>
						<c:choose>
							<c:when
								test="${fn:length(personalCenterInfos.teacherOrderTotal)>0}">
								<div class="order_table_jiajiao_record">
									<table class="order_table_offer">
										<caption>家教申请记录</caption>
										<tr>
											<th>订单号</th>
											<th>申请时间</th>
											<th>年级科目</th>
											<th>状态</th>
											<th>订单报酬</th>
										</tr>
										<c:forEach items="${personalCenterInfos.teacherOrderTotal}"
											var="orderTotal">
											<tr>
												<td>${orderTotal["orderId"]}</td>
												<td>${orderTotal["orderBeginTime"]}</td>
												<td>${orderTotal["subjectName"]}</td>
												<td><c:if test="${orderTotal['isPushToIndex']==1}">
														<c:out value="已处理" />
													</c:if> <c:if test="${orderTotal['isPushToIndex']==0}">
														<c:out value="正在处理" />
													</c:if></td>
												<td><span>￥</span>${orderTotal["price"]}</td>

											</tr>

										</c:forEach>
									</table>
								</div>
							</c:when>

							<c:otherwise>
								<div class="order_not_found">
									<img src="/GDZjiajiaowang/source/img/norecord.png" />
								</div>
							</c:otherwise>
						</c:choose>

					</div>

					<!--
                        	作者：972893248@qq.com
                        	时间：2017-11-11
                        	描述：右侧变化窗口5
                        -->
					<div
						class="section_box_inside_change_menuinfo5 section_box_left_div_comment_bywujinshan">
						<div>
							<h4>
								<span class="order_record_jiaoyuan">徐磊</span>的成功家教记录
							</h4>
							<p>成功记录是您过往在家教GDZ接受聘用并持续任教的历史记录，成功记录丰富，学员将会更愿意选择您任教。</p>
						</div>
						<c:choose>
							<c:when
								test="${fn:length(personalCenterInfos.teacherOrderSuccess)>0}">
								<div class="order_table_record_teacher">
									<table class="order_table_record_offer_teacher">
										<caption>家教记录</caption>
										<tr>
											<th>订单号</th>
											<th>申请时间</th>
											<th>年级科目</th>
											<th>学生编号</th>
											<th>完成时间</th>
											<th>本次报酬</th>
										</tr>

										<c:forEach items="${personalCenterInfos.teacherOrderSuccess}"
											var="orderSuccess">
											<!-- 									<c:if test="${orderSuccess['isPay']==1}"> -->
											<tr>


												<td>${orderSuccess["orderId"]}</td>
												<td>${orderSuccess["orderBeginTime"]}</td>
												<td>${orderSuccess["subjectName"]}</td>
												<td>${orderSuccess["studentId"]}</td>
												<td>${orderSuccess["orderFinishTime"]}</td>
												<td>￥<span>${orderSuccess["price"]}</span></td>

											</tr>
											<!-- 									</c:if> -->
										</c:forEach>

									</table>
								</div>
							</c:when>

							<c:otherwise>
								<div class="order_not_found">
									<img src="/GDZjiajiaowang/source/img/norecord.png" />
								</div>
							</c:otherwise>
						</c:choose>

					</div>

					<!--
                        	作者：972893248@qq.com
                        	时间：2017-11-11
                        	描述：右侧变化窗口6重置密码
                        -->
					<div
						class="section_box_inside_change_menuinfo6 section_box_left_div_comment_bywujinshan">
						<h2>修改密码</h2>
						<form>
							<div>
								<label class="section_box_inside_change_menuinfo6_limit">原密码：</label>
								<input type="password" class="old_pwd" id="oldPwd_input" />
							</div>
							<div>
								<label class="section_box_inside_change_menuinfo6_limit">新密码：</label>
								<input type="password" class="new_pwd" id="newPwd_input" />
							</div>
							<div>
								<label>再次输入新密码：</label> <input type="password" class="new_pwd" />
							</div>
							<button type="button" class="reset_pwd_buttom" id="changePwd">确认修改</button>
						</form>
					</div>

					<div class="success_changed">
						<img src="/GDZjiajiaowang/source/img/changesuccess.gif" />
						<p>密码修改成功!</p>
						<div class="box_choose_continue">
							<input type="button" value="返回首页" /> <input type="button"
								value="继续操作" />
						</div>
					</div>

					<div class="failed_changed">
						<img src="/GDZjiajiaowang/source/img/changefailed.gif" />
						<p>密码修改失败!</p>
					</div>
					<!--
                        	作者：972893248@qq.com
                        	时间：2017-11-10
                        	描述：右侧变化窗口7注销
                        -->
					<div
						class="section_box_inside_change_menuinfo7 section_box_left_div_comment_bywujinshan">
						<div>
							<h4>账户注销</h4>
							<p class="notice_info">
								亲爱的用户<span class="underline_now_user">${personalCenterInfos.teacherUserName}</span>，您确定要注销您的当前账户么？一旦注销您将失去您的所有订单信息和基本资料。
							</p>
							<p class="notice_info">如果您已经决定注销，请输入密码以便核实身份》》</p>
							<img src="/GDZjiajiaowang/source/img/seeyougoodbye.png" />
							<p class="notice_info_last">不在考虑下么？</p>
						</div>
						<div class="notice_box_right">
							<input type="password" placeholder="输入密码" id="input_the_pwd" /> <input
								type="button" value="确定" id="delete_sure" />
							
						</div>
					</div>


					<div class="failed_deleted">
						<img src="/GDZjiajiaowang/source/img/deletefailed.gif" />
						<p>核实身份不符，注销失败！</p>
					</div>

				</div>
			</div>
		</div>
		</div>
		<!--这是一块灰色色块，无实际作用-->
		<p class="section_box_extra_useless"></p>
		</div>
	</section>

	<!--
        	作者：972893248@qq.com
        	时间：2017-11-10
        	描述：footer
        -->
	<footer>
		<div>
			<div class="footer_top">
				<p>
					<span>推荐学科</span>
				<p>初中英语 初二数学 初三语文 初二数学 初三语文 初二数学 初三语文 初二数学 初三语文 初二数学 初三语文 初二数学
					初三语文 初二数学 初三语文 初二数学 初三语文</p>
				</p>
				<p>
					<span>相关城市</span>
				<p>南京家教 北京家教 宁波家教 广州家教 烟台家教 浙江家教 温州家教 宿迁家教 太原家教 贵州家教 福州家教 济南家教
					昆明家教 合肥家教</p>
				</p>
			</div>
			<div class="footer_bottom">
				<div class="clearfix footer_bottom_inside">
					<ul>
						<li><a href="#"><img
								src="/GDZjiajiaowang/source/img/22.png" /></a></li>
					</ul>
					<ul>
						<li>关于我们</li>
						<li>了解GDZ家教</li>
						<li>加入我们</li>
						<li>联系我们</li>
					</ul>
					<ul>
						<li>帮助中心</li>
						<li>初次使用家教网</li>
						<li>校企合作</li>
						<li>基础价格</li>
					</ul>
					<ul>
						<li>友情链接</li>
						<li>GDZ数学网</li>
						<li>GDZ北大青鸟</li>
						<li>GDZ多艺网</li>
					</ul>
					</ul>
					<ul>
						<li>关注我们</li>
						<li><img src="/GDZjiajiaowang/source/img/20.png" height="80"
							width="80" /></li>
						<li>扫一扫马上请家教</li>
					</ul>
					<ul>
						<li><img src="/GDZjiajiaowang/source/img/21.png" alt="" /></li>
						<li>请家教热线：890-887-8766</li>
						<li>投诉反馈：JDZ1412@163.com</li>
					</ul>
				</div>
			</div>
			<div class="fotter_black"></div>
		</div>

	</footer>
	<div id="black_success_out">
		<div class="success_deleted">
			<img src="/GDZjiajiaowang/source/img/seeyougoodbye.gif" />
			<p>账户已经注销，GDZ欢迎您下次使用!</p>
		</div>
	</div>
	<script type="text/javascript">
		$(function() {
			// 			初始化赋值
			var phoneNumNow="${personalCenterInfos.teacherPhone}";
			// 		初始化性别
			var sex01 = "${personalCenterInfos.teacherSex}";
			$(".sextochoose span").each(function() {
				if ($(this).text() == sex01) {
					$(this).addClass("choosedSubject");
				}
			})
			// 		初始化工作方式
			var personSex1 = "${personalCenterInfos.teacherSpeciality}";
			$(".workTypeToChoose span").each(function() {
				if ($(this).text() == personSex1) {
					$(this).addClass("choosedSubject");
				}
			})
			// 		初始化教师类型
			var persontype = "${personalCenterInfos.type}";
			$(".workCareer span").each(function() {
				if ($(this).text() == persontype) {
					$(this).addClass("choosedSubject");
				}
			})
			// 		初始化学历
			var edu001 = "${personalCenterInfos.teacherEducation}";
			$(".educationTochoose span").each(function() {
				if ($(this).text() == edu001) {
					$(this).addClass("choosedSubject");
				}
			})
			// 		初始化工作经验
			var teacherYear11 = "${personalCenterInfos.teachYear}";
			$(".hasWorkYears span").each(function() {
				if ($(this).text() == teacherYear11) {
					$(this).addClass("choosedSubject");
				}
			})
			// 		初始化学科
			var subsss = "${personalCenterInfos.subjectName}";
			$(".subjectToChoose span").each(function() {
				if (subsss.indexOf($(this).text()) >= 0) {
					$(this).addClass("choosedSubject");
				}
			})
			// 			地址与年级未找到，走ajax再次访问服务器
			$.ajax({
				url : "/GDZjiajiaowang/FindTeacherGradesServlet",
				type : "POST",
				success : function(result) {
					$(".gradeToChoose span").each(function() {
						if (result.indexOf($(this).text()) >= 0) {
							$(this).addClass("choosedSubject");
						}
					})

				}

			})

			$.ajax({
				url : "/GDZjiajiaowang/FindTeacherAddressIdServlet",
				type : "POST",
				success : function(result) {
					$(".workAreaOne span").each(function() {
						if (result == $(this).attr("value")) {
							$(this).addClass("choosedSubject");
						}
					})

				}
			})

			// 			各种修改事件

			// 单选选择事件
			$(".onlyOne span")
					.click(
							function() {
								if ($(this).hasClass("choosedSubject")) {

								} else {
									$(this).addClass("choosedSubject")
											.siblings().removeClass(
													"choosedSubject");
									//					如果是性别，则进入性别选择的ajax
									if ($(this).parent()
											.hasClass("sextochoose")) {
										var sex = $(this).text();
										$.ajax({
											url : "/GDZjiajiaowang/ChangeSex",
											type : "POST",
											data : "sex=" + sex,
											success : function(result) {
// 												alert(result)
											}
										})
									} else if ($(this).parent().hasClass(
											"workTypeToChoose")) {
										var workType = $(this).text();
// 										alert(workType)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeWorkTypeServlet",
													type : "POST",
													data : "workType="
															+ workType,
													success : function(result) {
// 														alert(result)
													}
												})
									} else if ($(this).parent().hasClass(
											"workCareer")) {
										var workCareer = $(this).attr("value");
// 										alert(workCareer)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeWorkCareerServlet",
													type : "POST",
													data : "workCareer="
															+ workCareer,
													success : function(result) {
// 														alert(result)
													}
												})
									} else if ($(this).parent().hasClass(
											"educationTochoose")) {
										var educationTochoose = $(this).text();
// 										alert(educationTochoose)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeEducationServlet",
													type : "POST",
													data : "educationTochoose="
															+ educationTochoose,
													success : function(result) {
// 														alert(result)
													}
												})
									} else if ($(this).parent().hasClass(
											"hasWorkYears")) {
										var hasWorkYears = $(this).text();
// 										alert(hasWorkYears)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeWorkYearsServlet",
													type : "POST",
													data : "hasWorkYears="
															+ hasWorkYears,
													success : function(result) {
// 														alert(result)
													}
												})
									}
									if ($(this).parent()
											.hasClass("workAreaOne")) {
										var workAreaOne = $(this).attr("value");
// 										alert(workAreaOne)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeWorkAreaServlet",
													type : "POST",
													data : "workAreaOne="
															+ workAreaOne,
													success : function(result) {
// 														alert(result)
													}
												})
									}

								}
							})
			$(".twoAndMore span")
					.click(
							function() {
								if ($(this).hasClass("choosedSubject")) {
									$(this).removeClass("choosedSubject")
									if ($(this).parent().hasClass(
											"gradeToChoose")) {
										var gradeId = $(this).attr("value");
// 										alert(gradeId)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeTeacherGradeServlet",
													type : "POST",
													data : "gradeId=" + gradeId
															+ "&op=delete",
													success : function(result) {
// 														alert(result)
													}
												})
									} else if ($(this).parent().hasClass(
											"subjectToChoose")) {
										var subjectId = $(this).attr("value");
// 										alert(subjectId)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeTeacherSubjectServlet",
													type : "POST",
													data : "subjectId="
															+ subjectId
															+ "&op=delete",
													success : function(result) {
// 														alert(result)
													}
												})
									}
								} else {
									$(this).addClass("choosedSubject");
									if ($(this).parent().hasClass(
											"gradeToChoose")) {
										var gradeId = $(this).attr("value");
// 										alert(gradeId)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeTeacherGradeServlet",
													type : "POST",
													data : "gradeId=" + gradeId
															+ "&op=add",
													success : function(result) {
// 														alert(result)
													}
												})
									} else if ($(this).parent().hasClass(
											"subjectToChoose")) {
										var subjectId = $(this).attr("value");
// 										alert(subjectId)
										$
												.ajax({
													url : "/GDZjiajiaowang/ChangeTeacherSubjectServlet",
													type : "POST",
													data : "subjectId="
															+ subjectId
															+ "&op=add",
													success : function(result) {
// 														alert(result)
													}
												})
									}
								}
							})

			//更改密码
			$("#changePwd")
					.click(
							function() {
								//					alert(teacher_been_id)
								var oldPwd_input = $(this).parent().find(
										"#oldPwd_input").val();
								var newPwd_input = $(this).parent().find(
										"#newPwd_input").val();
								var phoneNum = phoneNumNow;
								oldPwd_input = $.md5(phoneNum + oldPwd_input
										+ phoneNum);
								newPwd_input = $.md5(phoneNum + newPwd_input
										+ phoneNum);
								var json = {
									"teacherOldPwd" : oldPwd_input,
									"teacherNewPwd" : newPwd_input,
									"teacherPhone" : phoneNum,
									"teacherId" : teacher_been_id
								}
								alert(json);
								$
										.ajax({
											type : "post",
											url : "/GDZjiajiaowang/PersonalCenterChangePwdServlet",
											data : json,
											dataType : "json",
											traditional : true,
											contentType : "application/x-www-form-urlencoded; charset=utf-8",
											success : function(data) {
												alert("进入成功方法mimimi");
												if ("0" == data) {
													alert("密码输入错误，修改密码失败");
													$(
															".section_box_inside_change_menuinfo6")
															.hide();
													$(".failed_changed").show();
												} else {
													alert("修改成功")
													$(
															".section_box_inside_change_menuinfo6")
															.hide();
													$(".success_changed")
															.show();
												}
											}

										})

							})

			//注销当前的账户
			$("#delete_sure")
					.click(
							function() {
								alert("开始注销")
								var input_pwd = $("#input_the_pwd").val();
								var phoneNum = phoneNumNow
								input_pwd = $.md5(phoneNum + input_pwd
										+ phoneNum);
								$
										.ajax({
											type : "post",
											url : "/GDZjiajiaowang/PersonalCenterDeleteItServlet",
											data : {
												"teacherPwd" : input_pwd,
												"teacherId" : teacher_been_id,
												"teacherPhone" : phoneNum,
											},
											dataType : "json",
											contentType : "application/x-www-form-urlencoded; charset=utf-8",
											success : function(data) {

												if (data == "1") {

													$(
															".section_box_inside_change_menuinfo7")
															.hide();
													$("#black_success_out")
															.show();
													logout();
													setTimeout(
															function() {
																location.href = "/GDZjiajiaowang/source/page/index.jsp";
															}, 4000)

												} else {
													alert("注销失败")
													$(
															".section_box_inside_change_menuinfo7")
															.hide();
													$(".failed_deleted").show();
												}

											}

										})

							})

		})

		var fileButton = "";
		// 各版本浏览器获得文件地址
		function getObjectURL(file) {
			var url = null;
			if (window.createObjectURL != undefined) { // basic
				url = window.createObjectURL(file);
			} else if (window.URL != undefined) { // mozilla(firefox)
				url = window.URL.createObjectURL(file);
			} else if (window.webkitURL != undefined) { // webkit or chrome
				url = window.webkitURL.createObjectURL(file);
			}
			return url;
		}
		function getFileName(o) {
			var pos = o.lastIndexOf("\\");
			return o.substring(pos + 1);
		}

		$("#head_pic")
				.click(
						function() {
							fileButton = $("<input type='file' name='head_pic' accept='image/*' onchange='changehead_pic()'/>");
							fileButton.click();
						})

		$("#headImgSubmitButton").click(function() {
			var id = "${id}";

			var file = fileButton.get(0).files[0];
			var formData = new FormData();

			formData.append("id", id);
			formData.append("file", file);

			$.ajax({
				url : "/GDZjiajiaowang/PersonalCenterChangeImgServlet",
				type : "POST",
				data : formData,
				success : function(result) {
					alert("成功");

				},
				contentType : false, // 必须false才会自动加上正确的Content-Type
				processData : false
			// 必须false才会避开jQuery对 formdata 的默认处理
			});

		})

		function changehead_pic() {
			var head_pic = getObjectURL(fileButton.get(0).files[0]);
			$("#head_pic").attr("src", head_pic);

		}
	</script>
	</ body>
</html>